/**
 * Created by xie on 2018/3/30.
 */

angular.module('module.knowledge')
    .controller('PlantKnowledgeController', PlantKnowledgeController);

PlantKnowledgeController.$inject = ['$scope','$state','$cookieStore','$rootScope','$stateParams','KnowledgeService'];

function PlantKnowledgeController($scope, $state,$cookieStore, $rootScope,$stateParams,KnowledgeService) {
    var vm = this;
    var plantid= $stateParams.plantid;


    vm.goBack = goBack;
    function goBack(){
        history.back();

    }
    vm.reLoad=reLoad;
    function reLoad(){
        window.location.reload()
    }

    KnowledgeService.getPlantById(plantid).$promise.then(function(data){

        vm.plant = data;
        console.log(vm.plant);
    },function(err){
        console.log(err)
    });

    vm.aa = [
        "images/imggg/maimengxiaojin.png",
        "images/imggg/maimengxiaojin.png",
        "images/imggg/maimengxiaojin.png",
        "images/imggg/maimengxiaojin.png",
        "images/imggg/maimengxiaojin.png",
        "images/imggg/maimengxiaojin.png",
        "images/imggg/maimengxiaojin.png"


    ]

}